package ch1001;

public class ThreadTest {
    public static void main(String[] args) {
        Thread thread=new TestThread();
        thread.start();//start 为多线程，run 为单线程
        for (int i=1;i<=20;i++){
            System.out.println("main 线程 输出为:"+i);
        }
    }
}
class TestThread extends Thread{
    public void run(){
        for (int i=1;i<=20;i++){
            System.out.println("test 线程 输出为:"+i);
        }
    }
}
